import { useState } from 'react';
function useForm(initialValues) {
    //values存放着表单实际的值
    //setValues用来修改表单的值
    let [values, setValues] = useState(initialValues);
    //修改某个字段的值
    const setFieldValue = (key, value) => {
        setValues({ ...values, [key]: value });
    }
    return [values, setFieldValue];
}
export default useForm;